
GetKey
 I$=""
 Print "";

Get1
 If ((RR=1) And (Len(I$)=LL)) Then Gosub Get4:Goto Get5
 Get @1,A$
 A=Asc(A$)
 If (A<>44) And (A<>58) And (A<>127) And (A<>34) And (A>31) And (Len(I$)<(LL)) Then I$=I$+A$:Print chr$(a);:Goto Get1
 If ((A=13) And (I$="")) Goto Get1
 If A=13 Then Print: Gosub Get4:Goto Get5
 If (I$="") And ((A=24) or (A=21)) Then Print : Goto Get4
 If I$="" Then Goto Get2
 If A=8 Then Print A$;" "A$;:I$=Mid$(I$,1,Len(I$)-1):Goto Get1
 If A=127 Print Chr$(8)" "Chr$(8);:I$=Mid$(I$,1,Len(I$)-1):Goto Get1
 If ((A=24) or (A=21)) Then BS=Len(I$):For X=1 To BS: Print Chr$(8);" ";Chr$(8);:Next:Goto Getkey
 If A=22 Then Print:Print ":";I$;:Goto Get1
 If A=23 Then Goto Get2
 If Len(I$)=(LL) Then Print Chr$(7);
 Goto Get1

Get2
 X0=Len(I$)

Get3
 If X0 Then Print Chr$(8)" "Chr$(8);:X0=X0-1:If Mid$(I$,X0+1,1) <> " " Then Goto Get3
 I$=Mid$(I$,1,X0):Goto Get1

Get4
 If Len(i$)=1 Return
 If Left$(I$,1)=" " Then I$=Mid$(I$,2):Goto Get4
 If Right$(I$,1)=" " Then I$=Mid$((I$),1,Len(I$)-1):Goto Get4
 Return

Get5
 If I$="OFF" then Goto Hangup
 If I$="BYE" Then Goto Hangup
 If I$="MAIN" Then Pop:Link "A:Main.Seg"
 Return
